<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var a = 1;
        // 重复var声明同一个变量会被最后一个赋值覆盖
        var a = false;
        // let a = false;
        // 代码块
        console.log('a=',a);
        {
            let b = 1;
            console.log('b=',b);
        }
        // const的声明和赋值必须同时进行
        const c = 2;
        console.log('c=',c);
    </script>
</body>
</html>